package cn.tedu.controller;


import cn.tedu.pojo.dto.EmployeeDto;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Author Justin Parker
 * @Date 2024/8/7 0007 19:47
 * @Version 1.0
 */
@Controller
public class employeeController {

    @RequestMapping("/emp/insert")
    @ResponseBody
    public String insertEmployee(EmployeeDto employeeDto){
        String name = employeeDto.getName();
        Double salary = employeeDto.getSalary();
        String job = employeeDto.getJob();
        return "添加成功";
    }
    @RequestMapping("/emp/select")
    @ResponseBody
    public String selectEmployee(){
        return "恭喜，查询成功！";
    }

    @RequestMapping("/emp/update")
    @ResponseBody
    public String updateEmployee(EmployeeDto employeeDto){
        String id = employeeDto.getId();
        String name = employeeDto.getName();
        Double salary = employeeDto.getSalary();
        String job = employeeDto.getJob();
        return "恭喜，修改成功！";
    }

    @RequestMapping("/emp/delete")
    @ResponseBody
    public String deleteEmployee(EmployeeDto employeeDto){
        String id = employeeDto.getId();
        return "删除成功！";
    }

}
